class LoadCountryList < ActiveRecord::Migration
  def self.up 
    #Country list taken from ISO standard list July 2007  
    Country.new(:iso_code => "AD", :name =>"Andorra").save
    Country.new(:iso_code => "AE", :name =>"United Arab Emirates").save
    Country.new(:iso_code => "AF", :name =>"Afghanistan").save
    Country.new(:iso_code => "AG", :name =>"Antigua & Barbuda").save
    Country.new(:iso_code => "AI", :name =>"Anguilla").save
    Country.new(:iso_code => "AL", :name =>"Albania").save
    Country.new(:iso_code => "AM", :name =>"Armenia").save
    Country.new(:iso_code => "AN", :name =>"Netherlands Antilles").save
    Country.new(:iso_code => "AO", :name =>"Angola").save
    Country.new(:iso_code => "AQ", :name =>"Antarctica").save
    Country.new(:iso_code => "AR", :name =>"Argentina").save
    Country.new(:iso_code => "AS", :name =>"American Samoa").save
    Country.new(:iso_code => "AT", :name =>"Austria").save
    Country.new(:iso_code => "AU", :name =>"Australia").save
    Country.new(:iso_code => "AW", :name =>"Aruba").save
    Country.new(:iso_code => "AX", :name =>"Åland Islands").save
    Country.new(:iso_code => "AZ", :name =>"Azerbaijan").save
    Country.new(:iso_code => "BA", :name =>"Bosnia and Herzegovina").save
    Country.new(:iso_code => "BB", :name =>"Barbados").save
    Country.new(:iso_code => "BD", :name =>"Bangladesh").save
    Country.new(:iso_code => "BE", :name =>"Belgium").save
    Country.new(:iso_code => "BF", :name =>"Burkina Faso").save
    Country.new(:iso_code => "BG", :name =>"Bulgaria").save
    Country.new(:iso_code => "BH", :name =>"Bahrain").save
    Country.new(:iso_code => "BI", :name =>"Burundi").save
    Country.new(:iso_code => "BJ", :name =>"Benin").save
    Country.new(:iso_code => "BM", :name =>"Bermuda").save
    Country.new(:iso_code => "BN", :name =>"Brunei Darussalam").save
    Country.new(:iso_code => "BO", :name =>"Bolivia").save
    Country.new(:iso_code => "BR", :name =>"Brazil").save
    Country.new(:iso_code => "BS", :name =>"Bahama").save
    Country.new(:iso_code => "BT", :name =>"Bhutan").save
    Country.new(:iso_code => "BV", :name =>"Bouvet Island").save
    Country.new(:iso_code => "BW", :name =>"Botswana").save
    Country.new(:iso_code => "BY", :name =>"Belarus").save
    Country.new(:iso_code => "BZ", :name =>"Belize").save
    Country.new(:iso_code => "CA", :name =>"Canada").save
    Country.new(:iso_code => "CC", :name =>"Cocos (Keeling) Islands").save
    Country.new(:iso_code => "CD", :name =>"Democratic Republic of the Congo").save
    Country.new(:iso_code => "CF", :name =>"Central African Republic").save
    Country.new(:iso_code => "CG", :name =>"Congo").save
    Country.new(:iso_code => "CH", :name =>"Switzerland").save
    Country.new(:iso_code => "CI", :name =>"Côte D'ivoire (Ivory Coast)").save
    Country.new(:iso_code => "CK", :name =>"Cook Iislands").save
    Country.new(:iso_code => "CL", :name =>"Chile").save
    Country.new(:iso_code => "CM", :name =>"Cameroon").save
    Country.new(:iso_code => "CN", :name =>"China").save
    Country.new(:iso_code => "CO", :name =>"Colombia").save
    Country.new(:iso_code => "CR", :name =>"Costa Rica").save
    Country.new(:iso_code => "CU", :name =>"Cuba").save
    Country.new(:iso_code => "CV", :name =>"Cape Verde").save
    Country.new(:iso_code => "CX", :name =>"Christmas Island").save
    Country.new(:iso_code => "CY", :name =>"Cyprus").save
    Country.new(:iso_code => "CZ", :name =>"Czech Republic").save
    Country.new(:iso_code => "DE", :name =>"Germany").save
    Country.new(:iso_code => "DJ", :name =>"Djibouti").save
    Country.new(:iso_code => "DK", :name =>"Denmark").save
    Country.new(:iso_code => "DM", :name =>"Dominica").save
    Country.new(:iso_code => "DO", :name =>"Dominican Republic").save
    Country.new(:iso_code => "DZ", :name =>"Algeria").save
    Country.new(:iso_code => "EC", :name =>"Ecuador").save
    Country.new(:iso_code => "EE", :name =>"Estonia").save
    Country.new(:iso_code => "EG", :name =>"Egypt").save
    Country.new(:iso_code => "EH", :name =>"Western Sahara").save
    Country.new(:iso_code => "ER", :name =>"Eritrea").save
    Country.new(:iso_code => "ES", :name =>"Spain").save
    Country.new(:iso_code => "ET", :name =>"Ethiopia").save
    Country.new(:iso_code => "FI", :name =>"Finland").save
    Country.new(:iso_code => "FJ", :name =>"Fiji").save
    Country.new(:iso_code => "FK", :name =>"Falkland Islands (Malvinas)").save
    Country.new(:iso_code => "FM", :name =>"Micronesia").save
    Country.new(:iso_code => "FO", :name =>"Faroe Islands").save
    Country.new(:iso_code => "FR", :name =>"France").save
    Country.new(:iso_code => "FX", :name =>"France, Metropolitan").save
    Country.new(:iso_code => "GA", :name =>"Gabon").save
    Country.new(:iso_code => "GB", :name =>"United Kingdom (Great Britain)").save
    Country.new(:iso_code => "GD", :name =>"Grenada").save
    Country.new(:iso_code => "GE", :name =>"Georgia").save
    Country.new(:iso_code => "GF", :name =>"French Guiana").save
    Country.new(:iso_code => "GG", :name =>"Guernsey").save
    Country.new(:iso_code => "GH", :name =>"Ghana").save
    Country.new(:iso_code => "GI", :name =>"Gibraltar").save
    Country.new(:iso_code => "GL", :name =>"Greenland").save
    Country.new(:iso_code => "GM", :name =>"Gambia").save
    Country.new(:iso_code => "GN", :name =>"Guinea").save
    Country.new(:iso_code => "GP", :name =>"Guadeloupe").save
    Country.new(:iso_code => "GQ", :name =>"Equatorial Guinea").save
    Country.new(:iso_code => "GR", :name =>"Greece").save
    Country.new(:iso_code => "GS", :name =>"South Georgia and the South Sandwich Islands").save
    Country.new(:iso_code => "GT", :name =>"Guatemala").save
    Country.new(:iso_code => "GU", :name =>"Guam").save
    Country.new(:iso_code => "GW", :name =>"Guinea-Bissau").save
    Country.new(:iso_code => "GY", :name =>"Guyana").save
    Country.new(:iso_code => "HK", :name =>"Hong Kong").save
    Country.new(:iso_code => "HM", :name =>"Heard & McDonald Islands").save
    Country.new(:iso_code => "HN", :name =>"Honduras").save
    Country.new(:iso_code => "HR", :name =>"Croatia").save
    Country.new(:iso_code => "HT", :name =>"Haiti").save
    Country.new(:iso_code => "HU", :name =>"Hungary").save
    Country.new(:iso_code => "ID", :name =>"Indonesia").save
    Country.new(:iso_code => "IE", :name =>"Ireland").save
    Country.new(:iso_code => "IL", :name =>"Israel").save
    Country.new(:iso_code => "IM", :name =>"Isle of Man").save
    Country.new(:iso_code => "IN", :name =>"India").save
    Country.new(:iso_code => "IO", :name =>"British Indian Ocean Territory").save
    Country.new(:iso_code => "IQ", :name =>"Iraq").save
    Country.new(:iso_code => "IR", :name =>"Islamic Republic of Iran").save
    Country.new(:iso_code => "IS", :name =>"Iceland").save
    Country.new(:iso_code => "IT", :name =>"Italy").save
    Country.new(:iso_code => "JE", :name =>"Jersey").save
    Country.new(:iso_code => "JM", :name =>"Jamaica").save
    Country.new(:iso_code => "JO", :name =>"Jordan").save
    Country.new(:iso_code => "JP", :name =>"Japan").save
    Country.new(:iso_code => "KE", :name =>"Kenya").save
    Country.new(:iso_code => "KG", :name =>"Kyrgyzstan").save
    Country.new(:iso_code => "KH", :name =>"Cambodia").save
    Country.new(:iso_code => "KI", :name =>"Kiribati").save
    Country.new(:iso_code => "KM", :name =>"Comoros").save
    Country.new(:iso_code => "KN", :name =>"St. Kitts and Nevis").save
    Country.new(:iso_code => "KP", :name =>"Korea, Democratic People's Republic of").save
    Country.new(:iso_code => "KR", :name =>"Korea, Republic of").save
    Country.new(:iso_code => "KW", :name =>"Kuwait").save
    Country.new(:iso_code => "KY", :name =>"Cayman Islands").save
    Country.new(:iso_code => "KZ", :name =>"Kazakhstan").save
    Country.new(:iso_code => "LA", :name =>"Lao People's Democratic Republic").save
    Country.new(:iso_code => "LB", :name =>"Lebanon").save
    Country.new(:iso_code => "LC", :name =>"Saint Lucia").save
    Country.new(:iso_code => "LI", :name =>"Liechtenstein").save
    Country.new(:iso_code => "LK", :name =>"Sri Lanka").save
    Country.new(:iso_code => "LR", :name =>"Liberia").save
    Country.new(:iso_code => "LS", :name =>"Lesotho").save
    Country.new(:iso_code => "LT", :name =>"Lithuania").save
    Country.new(:iso_code => "LU", :name =>"Luxembourg").save
    Country.new(:iso_code => "LV", :name =>"Latvia").save
    Country.new(:iso_code => "LY", :name =>"Libyan Arab Jamahiriya").save
    Country.new(:iso_code => "MA", :name =>"Morocco").save
    Country.new(:iso_code => "MC", :name =>"Monaco").save
    Country.new(:iso_code => "MD", :name =>"Moldova, Republic of").save
    Country.new(:iso_code => "ME", :name =>"Montenegro").save
    Country.new(:iso_code => "MG", :name =>"Madagascar").save
    Country.new(:iso_code => "MH", :name =>"Marshall Islands").save
    Country.new(:iso_code => "MK", :name =>"Macedonia, the former Yugoslav Republic of").save
    Country.new(:iso_code => "ML", :name =>"Mali").save
    Country.new(:iso_code => "MN", :name =>"Mongolia").save
    Country.new(:iso_code => "MM", :name =>"Myanmar").save
    Country.new(:iso_code => "MO", :name =>"Macau").save
    Country.new(:iso_code => "MP", :name =>"Northern Mariana Islands").save
    Country.new(:iso_code => "MQ", :name =>"Martinique").save
    Country.new(:iso_code => "MR", :name =>"Mauritania").save
    Country.new(:iso_code => "MS", :name =>"Monserrat").save
    Country.new(:iso_code => "MT", :name =>"Malta").save
    Country.new(:iso_code => "MU", :name =>"Mauritius").save
    Country.new(:iso_code => "MV", :name =>"Maldives").save
    Country.new(:iso_code => "MW", :name =>"Malawi").save
    Country.new(:iso_code => "MX", :name =>"Mexico").save
    Country.new(:iso_code => "MY", :name =>"Malaysia").save
    Country.new(:iso_code => "MZ", :name =>"Mozambique").save
    Country.new(:iso_code => "NA", :name =>"Namibia").save
    Country.new(:iso_code => "NC", :name =>"New Caledonia").save
    Country.new(:iso_code => "NE", :name =>"Niger").save
    Country.new(:iso_code => "NF", :name =>"Norfolk Island").save
    Country.new(:iso_code => "NG", :name =>"Nigeria").save
    Country.new(:iso_code => "NI", :name =>"Nicaragua").save
    Country.new(:iso_code => "NL", :name =>"Netherlands").save
    Country.new(:iso_code => "NO", :name =>"Norway").save
    Country.new(:iso_code => "NP", :name =>"Nepal").save
    Country.new(:iso_code => "NR", :name =>"Nauru").save
    Country.new(:iso_code => "NU", :name =>"Niue").save
    Country.new(:iso_code => "NZ", :name =>"New Zealand").save
    Country.new(:iso_code => "OM", :name =>"Oman").save
    Country.new(:iso_code => "PA", :name =>"Panama").save
    Country.new(:iso_code => "PE", :name =>"Peru").save
    Country.new(:iso_code => "PF", :name =>"French Polynesia").save
    Country.new(:iso_code => "PG", :name =>"Papua New Guinea").save
    Country.new(:iso_code => "PH", :name =>"Philippines").save
    Country.new(:iso_code => "PK", :name =>"Pakistan").save
    Country.new(:iso_code => "PL", :name =>"Poland").save
    Country.new(:iso_code => "PM", :name =>"St. Pierre & Miquelon").save
    Country.new(:iso_code => "PN", :name =>"Pitcairn").save
    Country.new(:iso_code => "PR", :name =>"Puerto Rico").save
    Country.new(:iso_code => "PS", :name =>"Palestinian Territory").save
    Country.new(:iso_code => "PT", :name =>"Portugal").save
    Country.new(:iso_code => "PW", :name =>"Palau").save
    Country.new(:iso_code => "PY", :name =>"Paraguay").save
    Country.new(:iso_code => "QA", :name =>"Qatar").save
    Country.new(:iso_code => "RE", :name =>"Réunion").save
    Country.new(:iso_code => "RO", :name =>"Romania").save
    Country.new(:iso_code => "RS", :name =>"Serbia").save
    Country.new(:iso_code => "RU", :name =>"Russian Federation").save
    Country.new(:iso_code => "RW", :name =>"Rwanda").save
    Country.new(:iso_code => "SA", :name =>"Saudi Arabia").save
    Country.new(:iso_code => "SB", :name =>"Solomon Islands").save
    Country.new(:iso_code => "SC", :name =>"Seychelles").save
    Country.new(:iso_code => "SD", :name =>"Sudan").save
    Country.new(:iso_code => "SE", :name =>"Sweden").save
    Country.new(:iso_code => "SG", :name =>"Singapore").save
    Country.new(:iso_code => "SH", :name =>"St. Helena").save
    Country.new(:iso_code => "SI", :name =>"Slovenia").save
    Country.new(:iso_code => "SJ", :name =>"Svalbard & Jan Mayen Islands").save
    Country.new(:iso_code => "SK", :name =>"Slovakia").save
    Country.new(:iso_code => "SL", :name =>"Sierra Leone").save
    Country.new(:iso_code => "SM", :name =>"San Marino").save
    Country.new(:iso_code => "SN", :name =>"Senegal").save
    Country.new(:iso_code => "SO", :name =>"Somalia").save
    Country.new(:iso_code => "SR", :name =>"Suriname").save
    Country.new(:iso_code => "ST", :name =>"Sao Tome & Principe").save
    Country.new(:iso_code => "SV", :name =>"El Salvador").save
    Country.new(:iso_code => "SY", :name =>"Syrian Arab Republic").save
    Country.new(:iso_code => "SZ", :name =>"Swaziland").save
    Country.new(:iso_code => "TC", :name =>"Turks & Caicos Islands").save
    Country.new(:iso_code => "TD", :name =>"Chad").save
    Country.new(:iso_code => "TF", :name =>"French Southern Territories").save
    Country.new(:iso_code => "TG", :name =>"Togo").save
    Country.new(:iso_code => "TH", :name =>"Thailand").save
    Country.new(:iso_code => "TJ", :name =>"Tajikistan").save
    Country.new(:iso_code => "TK", :name =>"Tokelau").save
    Country.new(:iso_code => "TL", :name =>"Timor-Leste").save
    Country.new(:iso_code => "TM", :name =>"Turkmenistan").save
    Country.new(:iso_code => "TN", :name =>"Tunisia").save
    Country.new(:iso_code => "TO", :name =>"Tonga").save
    Country.new(:iso_code => "TR", :name =>"Turkey").save
    Country.new(:iso_code => "TT", :name =>"Trinidad & Tobago").save
    Country.new(:iso_code => "TV", :name =>"Tuvalu").save
    Country.new(:iso_code => "TW", :name =>"Taiwan, Province of China").save
    Country.new(:iso_code => "TZ", :name =>"Tanzania, United Republic of").save
    Country.new(:iso_code => "UA", :name =>"Ukraine").save
    Country.new(:iso_code => "UG", :name =>"Uganda").save
    Country.new(:iso_code => "UM", :name =>"United States Minor Outlying Islands").save
    Country.new(:iso_code => "US", :name =>"United States of America").save
    Country.new(:iso_code => "UY", :name =>"Uruguay").save
    Country.new(:iso_code => "UZ", :name =>"Uzbekistan").save
    Country.new(:iso_code => "VA", :name =>"Vatican City State (Holy See)").save
    Country.new(:iso_code => "VC", :name =>"St. Vincent & the Grenadines").save
    Country.new(:iso_code => "VE", :name =>"Venezuela").save
    Country.new(:iso_code => "VG", :name =>"British Virgin Islands").save
    Country.new(:iso_code => "VI", :name =>"United States Virgin Islands").save
    Country.new(:iso_code => "VN", :name =>"Viet Nam").save
    Country.new(:iso_code => "VU", :name =>"Vanuatu").save
    Country.new(:iso_code => "WF", :name =>"Wallis & Futuna Islands").save
    Country.new(:iso_code => "WS", :name =>"Samoa").save
    Country.new(:iso_code => "YE", :name =>"Yemen").save
    Country.new(:iso_code => "YT", :name =>"Mayotte").save
    Country.new(:iso_code => "ZA", :name =>"South Africa").save
    Country.new(:iso_code => "ZM", :name =>"Zambia").save
    Country.new(:iso_code => "ZW", :name =>"Zimbabwe").save
  end

  def self.down
    Country.find(:all).each do |c|
      c.destroy
    end
  end
end
